package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("workerCertificationAuditController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 服务实名认证接口")
public class WorkerCertificationAuditController {
    @Resource
    IWorkerCertificationService iWorkerCertificationService;

    /**
     * 提交认证申请
     */
    @PostMapping
    public void WorkerCertificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO) {
        iWorkerCertificationService.WorkerCertificationAudit(workerCertificationAuditAddReqDTO);
    }

    /**
     * 查询最新的驳回原因
     */
    @GetMapping("/rejectReason")
    public RejectReasonResDTO RejectReason() {
        return iWorkerCertificationService.rejectReason();
    }
}
